package com.ys.service.eKnowAi.impl;

import com.ys.entity.eKnowAi.EKnowTemplate;
import com.ys.mapper.eKnowAi.EKnowAiDiySqlMapper;
import com.ys.mapper.eKnowAi.EKnowTemplateMapper;
import com.ys.service.eKnowAi.EKnowTemplateService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("eKnowTemplateService")
public class EKnowTemplateServiceImpl implements EKnowTemplateService {
	private static final Logger logger = LoggerFactory.getLogger(EKnowTemplateServiceImpl.class);

	@Autowired
	private EKnowTemplateMapper eKnowTemplateMapper;
	@Autowired
	private EKnowAiDiySqlMapper eKnowAiDiySqlMapper;


	@Override
	public int add(EKnowTemplate eKnowTemplate) {
		eKnowTemplate.setStatus(1);
		int result = eKnowTemplateMapper.insert(eKnowTemplate);
		return result;
	}


	@Override
	public int update(EKnowTemplate eKnowTemplate) {
		eKnowTemplate.setStatus(1);
		int result = eKnowTemplateMapper.update(eKnowTemplate);
		return result;
	}

	@Override
	public int delete(long id) {
		int result = eKnowAiDiySqlMapper.deleteEKnowTemplate(id);
		return result;
	}


}
